xen init script: Tidy up wrong/missing Xen version error handling
authorIan Jackson <ian.jackson@citrix.com>
Thu, 7 Feb 2019 16:07:03 +0000 (16:07 +0000)
committerHans van Kranenburg <hans@knorrie.org>
Wed, 13 Feb 2019 00:07:44 +0000 (01:07 +0100)
commitb63ad5299f089c93ac9e3276c1a20eeeded34744
tree73184dbfa257e4a469f50e6b5336bb9b0e2f5272
parentef242a700765a971a6afc12d25ee19944dd3a27a
xen init script: Tidy up wrong/missing Xen version error handling

We no longer want to discard the stderr from xen-dir, and treat this
as a success.  All the reasons why this failure might previously have
been thought tolerable have been dealt with.

Specifically, we will no longer reach this code if we are not running
under Xen, or if we ran this init script on behalf of a xen-utils-V
package for some V different to the running Xen version.

We know we are running under Xen, and that either we're running not as
a result of a maint script, or as a result of a xen-utils-V maint
script for the running Xen version, or as a result of some other maint
script (of which we don't think there are any, but it presumably
expects this code to work).

So if xen-dir fails, let it print its error message, and also exit
nonzero.  And don't mention not running under Xen in our
log_warning_msg.

Signed-off-by: Ian Jackson <ian.jackson@citrix.com>
Acked-by: Hans van Kranenburg <hans@knorrie.org>
debian/xen-utils-common.xen.init